from fastapi import APIRouter, Depends
from models.pan_schemas import PanQueryRequest
from agents.pan_agent import process_pan_query
from core.auto import get_current_user
import logging

logger = logging.getLogger(__name__)


# 创建路由
router = APIRouter(
    prefix="/api/pan",
    tags=["网盘查询"],
)

@router.post("/query")
async def query_pan(
    request: PanQueryRequest,
    current_user: dict = Depends(get_current_user)
):
    """网盘查询接口"""
    # 设置用户ID
    request.account_no = current_user["accountNo"]
    # 调用代理处理请求


    return await process_pan_query(request)